import request from '@/utils/request'

export function getAuthsTree(params) {
  return request({
    url: '/core/admin123/right_v2/menuAjax_menuTree4JustMenu',
    method: 'get',
    params
  })
}

export function getMyAuthsByRoleId(params) {
  return request({
    url: '/core/admin123/right_v2/securityv2Ajax_queryMenus4RoleConfByRoleId',
    method: 'get',
    params
  })
}

export function saveMyAuthsByRoleId(data) {
  return request({
    url: '/core/admin123/right_v2/saveMyAuthsByRoleId',
    method: 'post',
    data
  })
}

export function addeditAuthNode(params) {
  return request({
    url: '/core/admin123/right_v2/menuAjax_addeditMenuNode',
    method: 'post',
    params
  })
}

export function delAuthNode(params) {
  return request({
    url: '/core/admin123/right_v2/menuAjax_removeMenuNode4AllNodes',
    method: 'post',
    params
  })
}

export function batchUpdateMenusSort(data) {
  return request({
    url: '/core/admin123/right_v2/batchUpdateMenusSort',
    method: 'post',
    data
  })
}


export function publishMenu(data) {
  return request({
    url: '/core/admin123/right_v2/publishMenu',
    method: 'post',
    data
  })
}

